﻿using RayDen.Library.Core;
using RayDen.Library.Core.Primitives;

namespace RayDen.Library.Entity.Scene {
    public class CameraInfo {
        public string CameraName;
        public Point Position;
        public Vector Direction, Up;
        public Matrix4x4 PosTransform, DirTransform;
        public float Fov = 45f, LensRadius=0.9f;
        public bool Pinhole;

        public CameraInfo(){}

        public CameraInfo(Frames.FrameCamera item)
        {
            if (item.LensRadius > 0f)
                LensRadius = item.LensRadius;
            Position = (Point) item.Position;
            Direction = item.Target;
            Up = item.Up;
            Pinhole = !item.FiniteApperture;

            CameraName = item.Name;
            if (item.Fov > 0f)
                Fov = item.Fov;
        }
    }
}
